<?php #//v.3.3.0
//if(!defined('INCLUDED')) exit("Access denied");
#///////////////////////////////////////////////////////
#// COPYRIGHT 2007 Phpauction.org ALL RIGHTS RESERVED //
#///////////////////////////////////////////////////////

if(isset($_COOKIE['USERLANGUAGE'])) {
  $USERLANG = $_COOKIE['USERLANGUAGE'];
} else {
  $USERLANG = $SETTINGS['defaultlanguage'];
}

//require("./config.inc.php");
include $include_path."messages.inc.php";

if($SETTINGS[signupfee] == 2) {
  $buffer = file($include_path."usermail.".$USERLANG.".inc.php");
} else {
  if($SETTINGS[feetype] == "pay") {
    $buffer = file($include_path."usermail_pay.".$USERLANG.".inc.php");
  } else {
    $buffer = file($include_path."usermail_prepay.".$USERLANG.".inc.php");
  }
}

$i = 0;
$j = 0;
while($i < count($buffer)) {
  if(!ereg("^#(.)*$",$buffer[$i])){
    $skipped_buffer[$j] = $buffer[$i];
    $j++;
  }
  $i++;
}
//--Reteve message

$CONFIRMATIONPAGE = $SETTINGS[siteurl]."confirm.php?id=$TPL_id_hidden";

$message = implode($skipped_buffer,"");

//--Change TAGS with variables content

$message = ereg_replace("<#c_id#>",AddSlashes($TPL_id_hidden),$message);
$message = ereg_replace("<#c_name#>",AddSlashes($TPL_name_hidden),$message);
$message = ereg_replace("<#c_nick#>",AddSlashes($TPL_nick_hidden),$message);
$message = ereg_replace("<#c_address#>",AddSlashes($_POST[TPL_address]),$message);
$message = ereg_replace("<#c_city#>",AddSlashes($_POST[TPL_city]),$message);
$message = ereg_replace("<#c_prov#>",AddSlashes($_POST[TPL_prov]),$message);
$message = ereg_replace("<#c_zip#>",AddSlashes($_POST[TPL_zip]),$message);
$message = ereg_replace("<#c_country#>",AddSlashes($_POST[TPL_country]),$message);
$message = ereg_replace("<#c_phone#>",AddSlashes($TPL_phone),$message);
$message = ereg_replace("<#c_email#>",AddSlashes($_POST[TPL_email]),$message);
$message = ereg_replace("<#c_password#>",AddSlashes($_POST[TPL_password]),$message);
$message = ereg_replace("<#c_sitename#>",$SETTINGS[sitename],$message);
$message = ereg_replace("<#c_siteurl#>",$SETTINGS[siteurl],$message);
$message = ereg_replace("<#c_adminemail#>",$SETTINGS[adminmail],$message);
$message = ereg_replace("<#c_confirmation_page#>",$CONFIRMATIONPAGE,$message);
$message = ereg_replace("<#c_logo#>",$SETTINGS[siteurl]."themes/".$SETTINGS[theme]."/".$SETTINGS[logo],$message);

mail($TPL_email_hidden,$MSG_098,$message,"From: ".$SETTINGS['sitename']." <".$SETTINGS['adminmail'].">\n"."Content-Type: text/html; charset=utf-8");
//mail('helpdesk@ajaxphppennyauction.com',$MSG_098,$message,"From: ".$SETTINGS['sitename']." <".$SETTINGS['adminmail'].">\n"."Content-Type: text/html; charset=$CHARSET");



?>